/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.muni.fi.rum.sender.listener;

import cz.muni.fi.rum.sender.command.RapRequest;
import java.util.Collections;
import java.util.List;

/**
 *
 * @author pmikulasek
 */
public class DefaultSenderEvent implements SenderEvent {

    private final Type type;
    private final List<RapRequest> messages;

    public DefaultSenderEvent(Type type) {
        this.type = type;
        this.messages = Collections.EMPTY_LIST;
    }

    public DefaultSenderEvent(Type type, List<RapRequest> messages) {
        this.type = type;
        this.messages = messages;
    }

    @Override
    public Type getEventType() {
        return type;
    }

    @Override
    public List<RapRequest> getRapRequests() {
        return Collections.unmodifiableList(messages);
    }
}
